import * as THREE from 'three'

/**
 * 透视相机
 * @param {*} options 配置
 * * viewAngle: 视觉角度
 * * widthHeight：宽高比
 * * near：近平面距离
 * * far：远平面距离
 */
export const createPerspectiveCamera = ({ viewAngle, widthHeight, near, far }) => {
  return new THREE.PerspectiveCamera(viewAngle, widthHeight, near, far)
}

/**
 * 
 */
export const createCubeCamera = () => {
  const cubeRenderTarget = new THREE.WebGLCubeRenderTarget( 128, { generateMipmaps: true, minFilter: THREE.LinearMipmapLinearFilter } );
  return new THREE.CubeCamera( 1, 100000, cubeRenderTarget );
}
